Why is function within main function in python always returning none when it should return a float

welcome to shbcf.ru